function CancelBubble(e){if(e.stopPropagation){e.preventDefault();e.stopPropagation()}else{e.cancelBubble=true;e.returnValue=false}}function NeedRootUser(){var e=document.getElementById("create_user_Y");var t=document.getElementById("create_db_Y");if(e.checked||t&&t.checked){document.getElementById("line1").style.display="";document.getElementById("line2").style.display="";document.getElementById("line3").style.display=""}else{document.getElementById("line1").style.display="none";document.getElementById("line2").style.display="none";document.getElementById("line3").style.display="none"}var n=document.getElementById("db_exists");var i=document.getElementById("db_new");if(n&&i){n.style.display=!t.checked?"block":"none";i.style.display=t.checked?"block":"none"}}function NeedUTFSection(e){if(e=="mssql"||e=="mssql_native"){document.getElementById("utf-row-two").style.display="none";document.getElementById("utf-row-one").style.display="none";document.getElementById("utf8_inst").checked=false;document.getElementsByName("__wiz_utf8")[0].value=""}else{document.getElementById("utf-row-one").style.display="";document.getElementById("utf-row-two").style.display=""}}function htmlspecialchars(e){if(typeof e!="string")return e;e=e.replace(/&/g,"&amp;");e=e.replace(/"/g,"&quot;");e=e.replace(/</g,"&lt;");e=e.replace(/>/g,"&gt;");return e}function strip_tags(e){return e.replace(/<\/?[^>]+>/gi,"")}function CAjaxForm(e,t,n){var i=document.forms[e];if(!i)i=document.getElementById(e);this.nextStep=i.elements[n];this.nextStepStage=i.elements[n+"Stage"];this.iframe=document.getElementById(t);this.form=i;this.form.target=t;var r=this;if(this.iframe.attachEvent)this.iframe.attachEvent("onload",function(){r.AjaxHandler()});else this.iframe.onload=function(){r.AjaxHandler()};this.percent=null;this.percent2=null;this.indicator=null;this.status=null}CAjaxForm.prototype.AjaxHandler=function(){if(this.iframe.contentWindow&&this.iframe.contentWindow.location.href.indexOf("http")!=0)return;if(this.iframe.contentDocument)var e=this.iframe.contentDocument;else var e=this.iframe.contentWindow.document;var t=e.body.innerHTML;if(t.length==0||e.getElementById("bitrix_install_template")){this.ShowError("Connection error. Empty response.");return}var n=new RegExp("\\[response\\]","i");var i=new RegExp("\\[/response\\]","i");var r=t.match(n);if(r===null){this.ShowError(t);return}var o=r.index+r[0].length;var s=t.search(i);if(s==-1){this.ShowError(t);return}t=t.substr(o,s-o);window.eval(t)};CAjaxForm.prototype.ShowError=function(e){var t=document.getElementById("error_container");var n=document.getElementById("error_text");if(!t||!n)return;var i=document.getElementById("wait");if(i)i.style.display="none";t.style.display="block";n.innerHTML=strip_tags(e);var r=document.getElementById("error_retry_button");var o=document.getElementById("error_skip_button");var s=this;var a=this.nextStep.value;var l=this.nextStepStage.value;r.onclick=function(){s.HideError();s.Post(a,l,"")};if(a=="main")o.onclick=function(){s.HideError();s.Post(a,l,"")};else o.onclick=function(){s.HideError();s.Post(a,"skip","")}};CAjaxForm.prototype.HideError=function(){var e=document.getElementById("error_container");var t=document.getElementById("error_text");if(!e||!t)return;while(t.firstChild)t.removeChild(t.firstChild);e.style.display="none";var n=document.getElementById("wait");if(n)n.style.display="block"};CAjaxForm.prototype.Post=function(e,t,n){if(e)this.nextStep.value=e;if(t)this.nextStepStage.value=t;this.form.submit();if(!this.status)this.status=document.getElementById("status");if(n.length>0)this.status.innerHTML=n+"..."};CAjaxForm.prototype.StopAjax=function(){this.iframe.onload=null;this.form.target="_self"};CAjaxForm.prototype.SetStatus=function(e,t){if(!this.percent)this.percent=document.getElementById("percent");if(!this.percent2)this.percent2=document.getElementById("percent2");if(!this.indicator)this.indicator=document.getElementById("indicator");if(!this.status)this.status=document.getElementById("status");this.status.innerHTML=t;if(this.percent)this.percent.innerHTML=e+"%";if(this.percent2)this.percent2.innerHTML=e+"%";this.indicator.style.width=e+"%"};function OnBeforeUserExit(e){if(!e)var e=window.event;e.returnValue=warningBeforeOnload}function PreloadImages(){var e=["prev.gif","error.gif","wait.gif","admin.gif","public.gif"];for(var t=0;t<e.length;t++){var n=new Image;n.src="/bitrix/images/install/"+e[t]}}
//# sourceMappingURL=script.map.js